package utils;

import java.util.Map;

import play.Logger;
import play.data.DynamicForm;
import play.libs.Json;

public class ControllerUtils {
	
	public static Object getParams(Class<?> clazz){
		Map<String, String> map = DynamicForm.form().bindFromRequest().data();
		Logger.info("Request Params:" + Json.toJson(map).toString());
		return Json.fromJson(Json.toJson(map),clazz);
	}

}
